<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?>
<?php list($updoc_js,$updoc_htm)=admin_upload_doc_list(array(
	'title'=>'上传文件',
	'record'=>isset($rs)?$rs:null
	))?>
<script language="JavaScript" type="text/javascript">
function page_load(){
	dialog_size(860);
	$(".form input:first").focus();
	dialog_editor("#content");
	<?=$updoc_js?>
}
</script>
<?=form_open_multipart("$title/post/$type_id")?>
<div class="dialog-title">
<h2><?=admin_create_caption($caption)?></h2>
<span><a href="javascript:close_dialog();">关闭 [X]</a></span>
</div>
<?=validation_errors('<div class="warning">','</div>')?>
<div class="form">
<ul class="halfside">
	<li>标题<br />
		<?=form_new_input('title','','class="text"')?></li>
	<li>类型<br />
		<?php $rs['type_id']=$type_id;?>
        <?=form_dropdown('type_id',$type_tree,set_edit_value('type_id',$rs))?></li>
	<i class="clear"></i>
	<li>发布时间<br />
		<?=form_new_input('timeline',date('Y-m-d H:i:s'),'class="text mydatetime"')?>
		</li>
	<li>状态<br />
		<label><?=form_new_checkbox('show','1',true)?>可见</label>&nbsp;&nbsp;
		<!--<label><? //=form_new_checkbox('recommend','1')?>推荐</label>&nbsp;&nbsp;-->
		</li>
</ul>
<?=$updoc_htm?>
<p>详细内容<br />
	<?=form_textarea('content',set_value('content'),'id="content"')?>
</p>
</div>
<div class="dialog-bottom">
	<div class="dbleft">
		<a href="javascript:close_dialog();" class="button"><span>&nbsp; 取消 &nbsp;</span></a>
	</div>
	<div class="dbright">
		<span class="submit"><input type="submit" value="保存信息" /></span>
	</div>
	<div class="clear"></div>
</div>
<?=form_close()?>